home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / super30a.zip / SMUTIL.ZIP / TEMPLATE.WS (.txt) < prev   
WordStar Document  |  1992-02-08  |  17KB  |  443 lines

  1. =========================[ Work Sheet Template ]============================
  2.  
  3.                            General Instructions
  4.  
  5. To use this file, first make a copy called TEMPLATE.SM.  Then edit the 
  6. COPY only.
  7.  
  8. This is a blank template that goes with your Template Worksheet.  To 
  9. use it follow along on your worksheet while filling in each choice in 
  10. this file.  Many examples are shown here :  make sure you delete the ones 
  11. that don't apply to your language products.  For other template examples, 
  12. see the sample configurations contained in the sample archives (MS.EXE, 
  13. BORT.EXE etc.).
  14.  
  15. All Script Command Statements start with an asterisk (*) on the first
  16. character of a line (there must be no spaces), followed by the command
  17. and its arguments.
  18.  
  19. All values are contained within |vertical lines|.
  20.  
  21. IMPORTANT:  Even if you are using a pre-defined template that came with
  22. SUPER-MAINT you MUST set the correct arguments in the *INCLUDE and *LIBRARY
  23. statements.
  24.  
  25. You will notice a few keywords used in this file.  The most important one is
  26. "NAME."  If SUPER-MAINT sees this in the second field of many statements it
  27. replaces the keyword with the actual name of a file.  So |NAME|.OBJ| might
  28. be translated to MYFILE.OBJ when the response file is written.  You may
  29. also use explicit names:  |MYFILE|.EXE| will ALWAYS be written as MYFILE.EXE.
  30.  
  31. There are four groups of instructions to fill in:
  32.  
  33.                      1.  General Command Statements
  34.                      2.  Linker Command Group
  35.                      3.  Librarian Command Group
  36.                      4.  Compiler Command Group
  37.  
  38. General commands contain a miscellaneous collection of information SUPER-
  39. MAINT needs to work correctly with your compiler and other language 
  40. products.
  41.  
  42. Command groups are mainly used to define how a response file is written.
  43. Each command represents a line or group of lines in your response file.
  44. For example, the *C command defines a how a list of files is written: in 
  45. a linker response file they would be the names of the object files being 
  46. linked.  "Before" and "After" action blocks can also be defined in a 
  47. command group.  These are commands that must take place just before or 
  48. just after the link (or librarian) command.
  49.  
  50. This file is heavily commented and has alternative versions of some of
  51. the command statements.  You should make a copy of this file (call it
  52. TEMPLATE.SM), make sure you only have the command statements for YOUR
  53. compiler(s), assembler, linker and/or librarian, deleting the alternative.
  54.  
  55. For example, *AC1 |MAC|NAME and *AC1 |NAME|MAC are both listed.  Delete 
  56. the one that doesn't apply to your compiler.
  57.  
  58. When you are satisfied that your Template file works correctly you should
  59. DELETE ALL THE COMMENTS so that SUPER-MAINT will run faster.  (You may leave 
  60. comments in the file if you choose to).
  61.  
  62. ======================================================================== ====
  63.  
  64. ===================[ Section 1: General Command Statements ]================
  65.  
  66. You need to have one of each of the commands listed in the General Command
  67. Group below.  The only exceptions are: You may replace the six *ACn 
  68. statements with a single *AC statement if the order of macros and file names 
  69. (and/or response files) is always the same.  If you are not moving any
  70. macros to the end of the command line, or are moving one or more for ALL 
  71. your languages, linker and librarian you may replace the five *MACROn 
  72. statements with one *MACRO statement.
  73.  
  74. Just edit the commands in this group, deleting examples you don't need.
  75. ------------------------------------------------------------------------ ----
  76.  
  77. A 20 Character Description of Your Setup
  78. *B  |EmmaSoft Compilers|
  79. ------------------------------------------------------------------------ ----
  80. Now we set the *AC commands.  These tell SUPER-MAINT  what order your
  81. compiler and other language tools take their commands in.
  82.  
  83. The order of the command for language 1:
  84.  
  85. This choice puts flags before the name of the program being compiled
  86. (most compilers work this way), for example:  CC -AS -AB PROGNAME.C
  87.  
  88. *AC1 |MAC|NAME
  89.  
  90. This one, on the other hand, puts the flags AFTER the name (Clipper works
  91. this way), for example:  CC PROGNAME.C -AS -AB
  92.  
  93. *AC1 |NAME|MAC
  94. ------------------------------------------------------------------------ ----
  95. Do the same for languages 2 and/or 3 (even if you aren't using them):
  96.  
  97. *AC2 |MAC|NAME
  98. *AC3 |MAC|NAME
  99. ------------------------------------------------------------------------ ----
  100. Now do the same for your Linker.  This calls the response file after the 
  101. command flags have been called.  Example:  LINKER /E /ST:20000 @RESFILE.RES
  102.  
  103. *AC4 |MAC|RES|
  104. ------------------------------------------------------------------------ ----
  105. Some librarians want the library name in the response file, so all you 
  106. need to do to call it is:  LIB /F1 /F2 @ RESFILE.RES
  107.  
  108. *AC5 |MAC|RES|
  109.  
  110. Others want you to put the library name on the command line like this:
  111. LIB /F1 /F2 MYLIBL.LIB @RESFILE.RES
  112.  
  113. *AC5 |MAC|NAME|RES|
  114.  
  115. ------------------------------------------------------------------------ ----
  116. This last one is for "Before" or "After" action block languages.  The 
  117. Windows SDK resource compiler is an example.  If you are not using 
  118. "Before" or "After" action blocks just leave this as is.
  119.  
  120. *AC6 |MAC|NAME
  121. ------------------------------------------------------------------------ ----
  122. If all your language tools use the following format you can replace all
  123. the *ACn commands with one command.  You must either use ALL SIX *ACn 
  124. commands, OR this one single command.  Do not use both!
  125.  
  126. *AC  |MAC|NAME|
  127.  
  128. The above is the equivalent of *AC1, 2, 3, and 6 with arguments: |MAC|NAME 
  129. and *AC4 and 5 with arguments: |MAC|RES|.
  130.  
  131.  
  132. ------------------------------------------------------------------------ ----
  133. Normally you want to keep all your macros together.  If so you only need 
  134. one Macro order statement.  
  135.  
  136. *MACRO ||
  137.  
  138. In RARE cases you may want some of your macros to appear LAST on the 
  139. command line.  If so you'll need a set of 5 Macro Statements:
  140.  
  141. *MACRO1 ||
  142. *MACRO2 |8|
  143. *MACRO3 ||
  144. *MACRO4 ||
  145. *MACRO5 ||
  146.  
  147. In the above example language number 2 (which may be a compiler or an 
  148. assembler) puts all it's macros together except for the Flags2 Macro,
  149. which appears at the end.  So a command in the make file for language 
  150. one would come out: CC -AS -Od -W4 MYFILE.C, and the same command for
  151. language 2 would come out: CC -AS -Od MYFILE.C -W4  (assuming that the
  152. flag -W4 is in the L2F2 - Language 2, Flags 2 - macro).
  153.  
  154. You can use numbers from 1 to eight.  See the manual for more 
  155. explanation.
  156. ------------------------------------------------------------------------ ----
  157. Below is the default symbol used to tell your linker or librarian that
  158. the following text is a response file.  (Example: LINK @RESFILE.RES).
  159. If your linker or librarian uses a different symbol replace the "@"
  160. sign with it.  (NOTE:  In the make file you will always see a "@" sign.
  161. This is the symbol SM needs to know it is passing a response file.  
  162. However when it sends the command to your linker or librarian it will 
  163. replace the "@" in the make file with the symbol defined here.  (NOTE:
  164. Most users will NOT have to change this).
  165.  
  166. *RC |@|
  167. ------------------------------------------------------------------------ ----
  168. This tells SUPER-MAINT what the extension of your library files is.
  169. (EXAMPLE:  MYLIB.LIB)  Do not include the dot.
  170.  
  171. *FXL |LIB|
  172. ------------------------------------------------------------------------ ----
  173. This tells SUPER-MAINT what the extension of your object files is.
  174. (EXAMPLE:  MYPROG.OBJ)  Do not include the dot.
  175.  
  176. *FXO |OBJ|
  177. ------------------------------------------------------------------------ ----
  178. ====IT IS VERY IMPORTANT that you correctly set the next two statements.====  
  179. ====Each defines a global library for SM to search for header files and ====
  180. ====libraries when they are used as dependents in a make file.          ====
  181. ------------------------------------------------------------------------ ----
  182. This statement tells SUPER-MAINT where your header files are kept:
  183.  
  184. *INCLUDE |D:\C\INCLUDE|
  185. ------------------------------------------------------------------------ ----
  186. This statement tells SUPER-MAINT where your libraries are kept.
  187.  
  188. *LIBRARY |D:\C\LIB|
  189. ------------------------------------------------------------------------ ----
  190.  
  191. ===================[ Section 2: Linker Command Statements ]=================
  192.  
  193. Command groups always start with an "ON" statement and end with an "OFF" 
  194. statement.  This section defines how response files are written for your
  195. linker.  Put the commands in the order they would appear in a response file.
  196. The order of the commands sandwiched between *LINKON and *LINKOFF is 
  197. determined by the order your linker requires them in.  See the manual for
  198. your linker for more information.
  199.  
  200. *LINKON
  201. ------------------------------------------------------------------------ ----
  202. In linker command groups the *C command tells how to list the object files.
  203. There are up to five arguments as follows:
  204.  
  205.             Symbol Before File Name
  206.             Name
  207.             Extension
  208.             Sym After Name
  209.             Use "After" Symbol each time or all but the last time?
  210.  
  211. Here are some examples:
  212.  
  213. If your object file list looks like this:  
  214.  
  215.         MYFILE1+
  216.         MYFILE2+
  217.         MYFILE3
  218. Use this command (notice that the ALLBUT key word places the '+' after
  219. all but the last object file name).
  220.  
  221. *C  ||NAME||+|ALLBUT|
  222.  
  223. Here are some more examples:
  224.  
  225.         OB MYFILE1
  226.         OB MYFILE2
  227.         OB MYFILE3
  228.  
  229. *C  |OB|NAME||||
  230.  
  231. Note in this example that you DO put the dot in the file extension:
  232.  
  233.          MYFILE1.OBJ&
  234.          MYFILE2.OBJ&
  235.          MYFILE3.OBJ
  236.  
  237. *C  ||NAME|.OBJ|&|ALLBUT|
  238. ------------------------------------------------------------------------ ----
  239. This tells the name of the executable file:
  240.  
  241.          MYPROG
  242.  
  243. *E  ||NAME
  244.  
  245.          MYPROG.EXE
  246.  
  247. *E  ||NAME|.EXE
  248.  
  249. ------------------------------------------------------------------------ ----
  250. This tells the name of the map file:
  251.          MYPROG
  252.  
  253. *M  ||NAME
  254.  
  255.          MYPROG.MAP
  256.  
  257. *M  ||NAME|.MAP
  258.  
  259. If you sometimes do NOT list a map file name you must ALSO tell SUPER-MAINT
  260. how to do that:
  261.  
  262. *MN |nul|
  263.  
  264. or
  265.  
  266. *MN |;|
  267. ------------------------------------------------------------------------ ----
  268. This command tells how to list libraries;
  269.  
  270.         MYLIB1+
  271.         MYLIB2+
  272.         MYLIB3
  273. Use this command (notice that the ALLBUT key word places the '+' after
  274. all but the last object file name).
  275.  
  276. *L  ||NAME||+|ALLBUT|
  277.  
  278. Here are some more examples:
  279.  
  280.         LIB MYLIB1
  281.         LIB MYLIB2
  282.         LIB MYLIB3
  283.  
  284. *C  |LIB|NAME||||
  285.  
  286. Note in this example that you DO put the dot in the file extension:
  287.  
  288.          MYLIB1.LIB&
  289.          MYLIB2.LIB&
  290.          MYLIB3.LIB
  291.  
  292. *L  ||NAME|.LIB|&|ALLBUT|
  293.  
  294. If you sometimes link without using any libraries you need a compainion 
  295. command here.  Just type in the text needed when there are no libraries:
  296.  
  297. *LN |;|
  298. ------------------------------------------------------------------------ ----
  299. This command tells how to list the Definitions File:
  300.  
  301. This example shows a way of not using a definitions file:
  302.  
  303. *D |nul.def|
  304.  
  305. Here's a way to use one:
  306.  
  307. *D ||NAME|.DEF|
  308.  
  309. ------------------------------------------------------------------------ ----
  310. If you are using "Before" or "After" command blocks (such as the Resource 
  311. Compiler for Microsoft's SDK for Windows) they should go at the end of this
  312. command group, just before the *LINKOFF statement.
  313.  
  314. ------------------------------------------------------------------------ ----
  315. This statement turns off (ends) this command group.
  316.  
  317. *LINKOFF
  318. ------------------------------------------------------------------------ ----
  319. =================[ Section 3: Librarian Command Statements ]================
  320.  
  321. Command groups always start with an "ON" statement and end with an "OFF" 
  322. statement.  This section defines how response files are written for your
  323. librarian.  Put the commands in the order they would appear in a response 
  324. file.
  325.  
  326. Librarians sometimes question you in a different order when the library 
  327. already exists than they do when the library being created is new.  For
  328. this reason you may have to use "companion" commands in your library
  329. response file (Microsoft and Borland librarians require this).
  330.  
  331. *LIBON
  332. ------------------------------------------------------------------------ ----
  333. This command tells the name of the library.  (If your *AC command has the
  334. library name in it you should not repeat it in the response file)
  335.  
  336.          MYLIB3.LIB
  337.  
  338. *E  ||NAME|.LIB|
  339.  
  340.          MYLIB3
  341.  
  342. *E  ||NAME|
  343. ------------------------------------------------------------------------ ----
  344. The Microsoft librarian asks if it is a new library when the library does
  345. not already exist.  So for NEW LIBRARIES ONLY you have to answer "Y" for 
  346. "yes."  The *TY command only works when a library is new.
  347.  
  348. *TY  |Y|
  349.  
  350. You could also use the *T command with the NEWNLY keyword.  This keyword
  351. tells SUPER-MAINT only to use this command if a library is new.
  352.  
  353. *T  |Y||||NEWNLY
  354. ------------------------------------------------------------------------ ----
  355. Now here is an example of companion commands.  If a library is new you
  356. just add the object files to it.  When it already exists you have to delete 
  357. the old version of an object file before adding the new version.  There are 
  358. four keywords you can use in the fifth (last) slot to control this.  For new
  359. libraries that have a symbol after the name of all but the last object file
  360. you use ALLBUTN.  If there is no last symbol (or it comes after every object
  361. file name) you use NEWNLY.  In like fashion you use ALLBUTO and OLDNLY for 
  362. old libraries (those that already exist).
  363.  
  364. Examples:    New                      Old
  365.    
  366.              MYFILE1.OBJ&             -+ MYFILE1.OBJ&
  367.              MYFILE2.OBJ&             -+ MYFILE2.OBJ&
  368.              MYFILE3.OBJ              -+ MYFILE3.OBJ&
  369.  
  370. *C  ||NAME|.OBJ|&|ALLBUTN|
  371. *C  |-+ |NAME|.OBJ|&|ALLBUTO|
  372.  
  373. Examples:    New                      Old
  374.    
  375.              ADD MYFILE1.OBJ             DEL MYFILE1.OBJ
  376.              ADD MYFILE2.OBJ             ADD MYFILE1.OBJ
  377.              ADD MYFILE3.OBJ             DEL MYFILE2.OBJ
  378.                                          ADD MYFILE2.OBJ
  379.                                          DEL MYFILE3.OBJ
  380.                                          ADD MYFILE3.OBJ
  381.  
  382. *C  |ADD|NAME|.OBJ||NEWNLY|
  383. *C  |DEL |NAME|.OBJ||OLDNLY|
  384. *C  |ADD |NAME|.OBJ||OLDNLY|
  385.  
  386. ------------------------------------------------------------------------ ----
  387. Here's another text command.  This will be used with new libraries only:
  388.  
  389. *T  |nul|
  390. ------------------------------------------------------------------------ ----
  391. Here's a command that is only used in existing libraries.  (It is the
  392. equivalent of *T  |;||||OLDNLY
  393.  
  394. *LX |;|
  395. ------------------------------------------------------------------------ ----
  396. If you are using "Before" or "After" command blocks they should go at the 
  397. end of this command group, just before the *LIBOFF statement.
  398.  
  399. ------------------------------------------------------------------------ ----
  400. This statement turns off (ends) this command group.
  401.  
  402. *LIBOFF
  403. ------------------------------------------------------------------------ ----
  404.  
  405. ==========[ Section 4: Compiler Response File Command Statements ]==========
  406.  
  407. Compiler response files can greatly speed up your program building because
  408. the compiler is only called one time.  If your compiler supports the use of 
  409. response files you may want to use this feature.  However, this only works
  410. with SUPER-MAINT if you are passing exactly the same flags to the compiler
  411. for every file it builds.  SUPER-MAINT reads the command line from the first
  412. appropriate action block and uses it for all the files being built in that
  413. pass.
  414.  
  415. Command groups always start with an "ON" statement and end with an "OFF" 
  416. statement.  This section defines how response files are written for your
  417. compile.
  418.  
  419. *COMPON
  420. ------------------------------------------------------------------------ ----
  421. If your compiler supports the use of response files use the foillowing command 
  422. statement (all the compilers that we are aware of that can use response files
  423. use this format with just one source file name on each line of the response 
  424. file.  Example:
  425.  
  426.                      FILE1.C
  427.                      FILE2.C
  428.                      FILE3.C
  429.  
  430. *CRFC ||NAME||||
  431.  
  432. ------------------------------------------------------------------------ ----
  433. Even if your compiler doesn't use response files it may be capable of
  434. accepting more than one source file on a command line.  If so, use the
  435. COMPLINE key word in your *CRFC statement.  
  436. (Example:  CC -AS -Od FILE1.C  FILE2.C  FILE3.C)
  437.  
  438. *CRFC |COMPLINE|
  439. ------------------------------------------------------------------------ ----
  440. This statement turns off (ends) this command group.
  441. *COMPOFF
  442. =================[ End Of Worksheet Template Example File ]=================
  443.